Optimal. Leaf size=137 \[ -\frac{5 a^2 \cos (c+d x)}{8 d (a \sin (c+d x)+a)^{3/2}}+\frac{\sec ^3(c+d x) \sqrt{a \sin (c+d x)+a}}{3 d}+\frac{5 a \sec (c+d x)}{6 d \sqrt{a \sin (c+d x)+a}}-\frac{5 \sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \cos (c+d x)}{\sqrt{2} \sqrt{a \sin (c+d x)+a}}\right )}{8 \sqrt{2} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.158793, antiderivative size = 137, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.217, Rules used = {2675, 2687, 2650, 2649, 206} \[ -\frac{5 a^2 \cos (c+d x)}{8 d (a \sin (c+d x)+a)^{3/2}}+\frac{\sec ^3(c+d x) \sqrt{a \sin (c+d x)+a}}{3 d}+\frac{5 a \sec (c+d x)}{6 d \sqrt{a \sin (c+d x)+a}}-\frac{5 \sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \cos (c+d x)}{\sqrt{2} \sqrt{a \sin (c+d x)+a}}\right )}{8 \sqrt{2} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2675
Rule 2687
Rule 2650
Rule 2649
Rule 206
Rubi steps
\begin{align*} \int \sec ^4(c+d x) \sqrt{a+a \sin (c+d x)} \, dx &=\frac{\sec ^3(c+d x) \sqrt{a+a \sin (c+d x)}}{3 d}+\frac{1}{6} (5 a) \int \frac{\sec ^2(c+d x)}{\sqrt{a+a \sin (c+d x)}} \, dx\\ &=\frac{5 a \sec (c+d x)}{6 d \sqrt{a+a \sin (c+d x)}}+\frac{\sec ^3(c+d x) \sqrt{a+a \sin (c+d x)}}{3 d}+\frac{1}{4} \left (5 a^2\right ) \int \frac{1}{(a+a \sin (c+d x))^{3/2}} \, dx\\ &=-\frac{5 a^2 \cos (c+d x)}{8 d (a+a \sin (c+d x))^{3/2}}+\frac{5 a \sec (c+d x)}{6 d \sqrt{a+a \sin (c+d x)}}+\frac{\sec ^3(c+d x) \sqrt{a+a \sin (c+d x)}}{3 d}+\frac{1}{16} (5 a) \int \frac{1}{\sqrt{a+a \sin (c+d x)}} \, dx\\ &=-\frac{5 a^2 \cos (c+d x)}{8 d (a+a \sin (c+d x))^{3/2}}+\frac{5 a \sec (c+d x)}{6 d \sqrt{a+a \sin (c+d x)}}+\frac{\sec ^3(c+d x) \sqrt{a+a \sin (c+d x)}}{3 d}-\frac{(5 a) \operatorname{Subst}\left (\int \frac{1}{2 a-x^2} \, dx,x,\frac{a \cos (c+d x)}{\sqrt{a+a \sin (c+d x)}}\right )}{8 d}\\ &=-\frac{5 \sqrt{a} \tanh ^{-1}\left (\frac{\sqrt{a} \cos (c+d x)}{\sqrt{2} \sqrt{a+a \sin (c+d x)}}\right )}{8 \sqrt{2} d}-\frac{5 a^2 \cos (c+d x)}{8 d (a+a \sin (c+d x))^{3/2}}+\frac{5 a \sec (c+d x)}{6 d \sqrt{a+a \sin (c+d x)}}+\frac{\sec ^3(c+d x) \sqrt{a+a \sin (c+d x)}}{3 d}\\ \end{align*}
Mathematica [C] time = 0.401383, size = 302, normalized size = 2.2 \[ \frac{\sqrt{a (\sin (c+d x)+1)} \left (\frac{12 \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )^2}{\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )}+\frac{4 \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )^2}{\left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )^3}-\frac{3 \left (\cos \left (\frac{c}{2}\right )-\sin \left (\frac{c}{2}\right )\right ) \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )}{\sin \left (\frac{c}{2}\right )+\cos \left (\frac{c}{2}\right )}+\frac{6 \sin \left (\frac{d x}{2}\right )}{\sin \left (\frac{c}{2}\right )+\cos \left (\frac{c}{2}\right )}+(-15-15 i) (-1)^{3/4} \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )^2 \tanh ^{-1}\left (\left (\frac{1}{2}+\frac{i}{2}\right ) (-1)^{3/4} \sec \left (\frac{d x}{4}\right ) \left (\cos \left (\frac{1}{4} (2 c+d x)\right )-\sin \left (\frac{1}{4} (2 c+d x)\right )\right )\right )\right )}{24 d \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.12, size = 153, normalized size = 1.1 \begin{align*}{\frac{1}{ \left ( 48\,\sin \left ( dx+c \right ) -48 \right ) \cos \left ( dx+c \right ) d} \left ( \sin \left ( dx+c \right ) \left ( 15\, \left ( a-a\sin \left ( dx+c \right ) \right ) ^{3/2}\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{a-a\sin \left ( dx+c \right ) }\sqrt{2}}{\sqrt{a}}} \right ) a-20\,{a}^{5/2} \right ) -30\,{a}^{5/2} \left ( \cos \left ( dx+c \right ) \right ) ^{2}+15\, \left ( a-a\sin \left ( dx+c \right ) \right ) ^{3/2}\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{a-a\sin \left ( dx+c \right ) }\sqrt{2}}{\sqrt{a}}} \right ) a+4\,{a}^{5/2} \right ){a}^{-{\frac{3}{2}}}{\frac{1}{\sqrt{a+a\sin \left ( dx+c \right ) }}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \sqrt{a \sin \left (d x + c\right ) + a} \sec \left (d x + c\right )^{4}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.76711, size = 517, normalized size = 3.77 \begin{align*} \frac{15 \, \sqrt{2} \sqrt{a} \cos \left (d x + c\right )^{3} \log \left (-\frac{a \cos \left (d x + c\right )^{2} - 2 \, \sqrt{a \sin \left (d x + c\right ) + a}{\left (\sqrt{2} \cos \left (d x + c\right ) - \sqrt{2} \sin \left (d x + c\right ) + \sqrt{2}\right )} \sqrt{a} + 3 \, a \cos \left (d x + c\right ) -{\left (a \cos \left (d x + c\right ) - 2 \, a\right )} \sin \left (d x + c\right ) + 2 \, a}{\cos \left (d x + c\right )^{2} -{\left (\cos \left (d x + c\right ) + 2\right )} \sin \left (d x + c\right ) - \cos \left (d x + c\right ) - 2}\right ) + 4 \,{\left (15 \, \cos \left (d x + c\right )^{2} + 10 \, \sin \left (d x + c\right ) - 2\right )} \sqrt{a \sin \left (d x + c\right ) + a}}{96 \, d \cos \left (d x + c\right )^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \mathit{sage}_{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]